package com.example.demo.indicator;

import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;

/**
 * Copyright(C), 2020-2021, AmbroseCdMeng
 * FileName:    MyHealthIndicator
 * Author:      AmbroseCdMeng
 * Date:        2021/3/6 13:33
 * Description: 为健康指示器创建一个自定义的健康指标
 * History:
 * <author>     <time>      <version>       <desc>
 * 作者姓名     修改时间        版本号           描述
 */
public class MyHealthIndicator extends AbstractHealthIndicator {
    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {
        builder.up().withDetail("自定义状态", "OK");
    }
}
